<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="keyword" content="">

    <title>项目列表-工程巡查管理</title>

    <!-- Bootstrap core CSS -->
    <link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="__PUBLIC__/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link href="__PUBLIC__/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.css" rel="stylesheet" type="text/css" media="screen"/>
    <link rel="stylesheet" href="__PUBLIC__/css/owl.carousel.css" type="text/css" />
    <!-- Custom styles for this template -->
    <link href="__PUBLIC__/css/style.css" rel="stylesheet" />
    <link href="__PUBLIC__/css/style-responsive.css" rel="stylesheet" />
    <!-- new styles-->
      <link href="__PUBLIC__/css/xxxstyle.css" rel="stylesheet" />
    
       <link rel="stylesheet" href="__PUBLIC__/css/jquery.treeview.css" />

      <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
      <script src="__PUBLIC__/js/html5shiv.js"></script>
      <script src="__PUBLIC__/js/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

  <section id="container">
      <!--main content start-->
      <section id="main-content">
          <section class="wrapper">
              <div class="row">
                  <div class="col-xs-12 maxColWid" id="taskdetail">
                     	 <div class="row">
                          <div class="col-xs-12">
                              <section class="panel iframeMinHeight">
                                  <header class="panel-heading"><i class="icon-tag iconRed"></i>{$task.name}
                                     <span class="tools pull-right">
                                     	  <button type="button" class="btn btn-default btn-xs" onclick="javascript:window.history.back();return false;"><i class="icon-reply"></i>返回</button>                                 
                                   </span>
                                  </header>
                                  <div class="panel-body">
                                      <div class="task-table-1 conProj">
                                          <div class="t1-row">
                                              <div class="row1-1 t1-bgA">任务名称</div>
                                              <div class="row4-1">{$task.name}</div>
                                              <div class="row2-1 t1-bgA">任务类型</div>
                                              <div class="row2-2">{$task_status['type'][$task['type']]}</div>
                                          </div>
                                          <div class="t1-row">
                                              <div class="row2-1 t1-bgA">指派给</div>
                                              <div class="row2-2">{$task.assigname}</div>
                                              <div class="row2-1 t1-bgA">任务状态</div>
                                                <?php $time = strtotime($task['t_stop']);
		                                                      		$time1 = time();
		                                                      ?>
		                                       <if condition="$time1 gt $time && $task['status'] neq 4">
		                                       <div class="row2-2"><span style="color:red;">任务已超时</span></div>
		                                       <else/>
                                              <div class="row2-2">{$task_status['status'][$task['status']]}</div>
                                              </if>
                                              <div class="row2-1 t1-bgA">结束日期</div>
                                              <div class="row2-2">{$task.t_stop}</div>
                                          </div>
                                          <div class="t1-row">
                                              <div class="row1-1 t1-bgA">来自</div>
                                              <div class="row4-1">{$task.cfrom}</div> 
                                              <div class="row2-1 t1-bgA">优先级</div>
                                              <div class="row2-2">{$task_status['priority'][$task['priority']]}</div>
                                            <!--   <div class="row1-1 t1-bgA">严重程度</div>
                                              <div class="row2-2">{$task_status['severity'][$task['severity']]}</div> -->
                                          </div>                                                                           
                                      </div>                                 
                                      <div class="task-details">                                        
                                          <div class="collisionReport-table">
                                              <div class="cRtable-row">
                                                  <div class="cRow-9 cRtable-bg">任务内容</div>                                                 
                                              </div>
                                              <div class="cRtable-row">
                                                  <div class="cRow-9 cRowY">{$task.describe|json_decode}</div>                                              
                                              </div>
                                          </div>
                                      </div>
                            			
                            	     <div class="task-details">
                                          <div class="collisionReport-table rowComMargin">
                                              <div class="cRtable-row">
                                                  <div class="cRow-9 cRtable-bg">成果备注</div>                                                 
                                              </div>
                                              <div class="cRtable-row">
                                                  <div class="cRow-9 cRowY">{$remark.remarks}</div>                                              
                                              </div>
                                          </div>
                                          <div class="row rowComMargin">
                                              <div class="col-xs-2">
                                                <p class="rowComLabel">附件</p>
                                              </div>
                                              <div class="col-xs-10 rowComA">
                                              <foreach name="enclosure" item="v" key="k">
                                                <a href="{:U('Bim/downLink',array('id'=>$v['id'],'name'=>$v['name'],'filename'=>$v['mname']))}">{$v.name}</a>
                                              </foreach>
                                              </div>
                                          </div>
                                      </div>
                                       <!--审批 状态为审批中-->
                                      <if condition="$task['status'] eq 7">    
	                                      <div class="task-details">
	                                          <div class="rowComTitle">审批</div>
	                                          <div class="row rowComMargin">
	                                              <div class="col-xs-2">
	                                                <p class="rowComLabel">意见</p>
	                                              </div>
	                                              <div class="col-xs-10">
	                                                <textarea class="form-control" rows="4" placeholder="请输入内容(100字内)" name="content" maxlength="100"></textarea> 
	                                              </div>
	                                          </div> 
	                                          <div class="cReport-btn rowComMargin">
	                                              <button class="btn btn-danger" onclick="achieok(2)">驳回</button>
	                                              <button type="submit" class="btn btn-submit" onclick="achieok(1)">通过</button>
	                                          </div>
	                                      </div>
										</if>
										
										 <!--驳回-->
										<if condition="$task['status'] eq 5">    
	                                      <div class="task-details">
	                                          <div class="collisionReport-table rowComMargin">
	                                              <div class="cRtable-row">
	                                                  <div class="cRow-9 cRtable-bg">驳回意见</div>                                                 
	                                              </div>
	                                              <div class="cRtable-row">
	                                                  <div class="cRow-9 cRowY">{$remarks.remarks}</div>                                              
	                                              </div>
	                                          </div>
	                                      </div>
	                                    </if>
	                                    <!--已完成-->
										<if condition="$task['status'] eq 4">    
	                                      <div class="task-details">
	                                          <div class="collisionReport-table rowComMargin">
	                                              <div class="cRtable-row">
	                                                  <div class="cRow-9 cRtable-bg">审核意见</div>                                                 
	                                              </div>
	                                              <div class="cRtable-row">
	                                                  <div class="cRow-9 cRowY">{$remarks.remarks}</div>                                              
	                                              </div>
	                                          </div>
	                                      </div>
	                                    </if>
                                  </div>
                              </section>
                          </div>
                      </div>
                  </div>
              </div>
          </section>
      </section>
      <!--main content end-->
  </section>

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
    <script src="__PUBLIC__/js/bootstrap.min.js"></script>

    <!--common script for all pages-->
 <!--     <script src="__PUBLIC__/js/common-scripts.js"></script>  -->

    <!--new script for this page only-->
    <script type="text/javascript" src="__PUBLIC__/js/layer/layer.js"></script>
    <script type="text/javascript">
        
       function  achieok(status){
    	   var tid = {$task['tid']};
    	   var dtid = {$dtid};
    	   var remarks = $("textarea[name='content']").val();
    	   if(tid == '' || dtid == '' || status == ''){
    		   layer.msg('数据id有误',{icon:2});
   		 	    return;
    	   }
    	   if(remarks==''){
          	 layer.msg('描述不能为空',{icon:2});
     		 	 return;
           }
    	   	  $.ajax({
    		 		type : 'post',
    		 		url : '__URL__/achieok',
    		 		data : {dtid:dtid,tid:tid,remarks:remarks,status:status},
    		 		dataType : 'json',
    		 		success : function(res){
    		 			 if(res.status==0){
    							layer.alert(res.info, {icon: 2});
    							return;
    						 }
    		 			 if(!res.errNo){
    		 				 layer.msg(res.msg,{icon:1});
    		 				 setTimeout("location.reload()",2000);
    			          }else{
    			        	 layer.msg(res.msg,{icon:2});
    			          }
    		 		}
    		     })
       }
    </script>
    
  </body>
</html>
